$(function() {

	// 点击关注显示 隐藏
		$(function() {
			 $('.down').css('opacity', 0.3);
			 $('.guanzhu span').click(function(event) {
        
        			$('.tianjiaguanzhu,.down').fadeIn();

      		});
			 $('.guanzhu em').click(function(event) {
        
        			$('.tiwen,.down').fadeIn();

      		});
			 //单击关闭按钮时，让模态对话框隐藏
		      $('.btn2').click(function(event) {
		        $('.tianjiaguanzhu,.down,.tiwen').fadeOut();
		      }); 




		});
		// 点击关注显示 隐藏结束


	
	var iUl;
	var iList=8;
	// 点击分类显示不同分类里面的老师
	var ifenlei;
	$('.fenleiFuck li').click(function(event) {





		ifenlei=$(this).index();

		$(this).addClass('current').siblings('li').removeClass('current');
		$('.liebiaoFuck').eq(ifenlei).fadeIn('fast').siblings('ul').hide();
		// 显示前N个开始-----------------------------------------------------------
		// 获取当前显示的那个ul列表的index值···························
	
		iList=8;
		$('.liebiaoShow').each(function(index, element) {
			if ($(element).is(':hidden')) {}else{
				iUl=index;
				;};
			
		});

	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(3)').hide();
// 显示前N个结束-----------------------------------------------------------







	});
	// 完成·····················································
	// 
	// 点击分类显示不同分类里面的音乐之星
	var ifenlei;
	$('.fenleiCa li').click(function(event) {


		ifenlei=$(this).index();
		
		$(this).addClass('current').siblings('li').removeClass('current');
		$('.liebiaoCa').eq(ifenlei).fadeIn('fast').siblings('ul').hide();

		// 显示前N个开始-----------------------------------------------------------
		// 获取当前显示的那个ul列表的index值···························
		
		iList=8;
		$('.liebiaoShow').each(function(index, element) {
			if ($(element).is(':hidden')) {}else{
				iUl=index;
				;};
			
		});
		
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(3)').hide();
// 显示前N个结束-----------------------------------------------------------
	});
	// 完成·····················································

	// 左侧的二级菜单点击，右侧显示相应的内容·····················
	$('.mingrenPoint').click(function(event) {
		$('.mingrenPoint').addClass('current');
		$('.zhixingPoint').removeClass('current');
		$('.yinyuemingren').stop(true).show();
		$('.xinyuezhixing').stop(true).hide();
		$('.citySearch').stop(true).hide();
		// 显示前N个开始-----------------------------------------------------------
	// 获取当前显示的那个ul列表的index值···························
	iList=8;
	var iContent;
	$('.qzdtContent>div').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iContent=index;
			};
	});
	$('.liebiaoShow').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iUl=index;
			;};
		
	});
	
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(3)').hide();
// 显示前N个结束-----------------------------------------------------------
// 
	});
	$('.zhixingPoint').click(function(event) {
		$('.mingrenPoint').removeClass('current');
		$('.zhixingPoint').addClass('current');
		$('.yinyuemingren').stop(true).hide();
		$('.xinyuezhixing').stop(true).show();
		$('.citySearch').stop(true).hide();
		// 显示前N个开始-----------------------------------------------------------
	// 获取当前显示的那个ul列表的index值···························
	iList=8;
	
	$('.qzdtContent>div').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iContent=index;
			};
	});
	$('.liebiaoShow').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iUl=index;
			;};
		
	});
	
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个children('li:gt(20)').hide()
	$('.liebiaoShow').eq(iUl).children('li:gt(3)').hide();
// 显示前N个结束-----------------------------------------------------------

	


	});

	// 瀑布流下拉显示·············································
	// 
	

// 显示前N个开始-----------------------------------------------------------
	// 获取当前显示的那个ul列表的index值···························
	
	var iContent;
	$('.qzdtContent>div').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iContent=index;
			};
	});
	$('.liebiaoShow').each(function(index, element) {
		if ($(element).is(':hidden')) {}else{
			iUl=index;
			;};
		
	});
	
	// 获取当前显示的那个ul列表的index值结束·······················
	// 首先显示前20个c
	$('.liebiaoShow').eq(iUl).children('li:gt(3)').hide();
	

// 显示前N个结束-----------------------------------------------------------
	
	$(window).scroll(function(event) {
							if ($(document).scrollTop() + $(window).height() > $(document).height() - 150) {
									 

									for (var i = iList; i < iList+4; i++) {
												
										$('.liebiaoShow').eq(iUl).children('li').eq(i).slideDown('');
										
										

									};

									iList=iList+4;
							};
						});


				// 提交城市新信息切换列表内容····················································
				$('.tijiao input').click(function(event) {
					$('.yinyuemingren').stop(true).hide();
					$('.xinyuezhixing').stop(true).hide();
					$('.citySearch').stop(true).show();
				});







// 提交城市新信息切换列表内容结束····················································

















});

var Gid  = document.getElementById ;
var showArea = function(){
	Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" + 	
	Gid('s_city').value + " - 县/区" + 
	Gid('s_county').value + "</h3>"
							}
Gid('s_county').setAttribute('onchange','showArea()');

